Skip to content

Conversation

Jiahui17
Copy link

@Jiahui17 Jiahui17 commented Mar 18, 2025

Problem:

In Verilog, the statement

reg my_reg = 0;

is the same as

reg my_reg;
initial my_reg = 0;

whereas in the current HEAD, the statement above
is translated to

reg my_reg; assign my_reg = 0;

Solution

This commit fixes this bug by converting the assignment ast node to a blocking assignment wrapped in an initial block.

in verilog, the statement

```
reg my_reg = 0;
```

is the same as

```
reg my_reg;
initial my_reg = 0;
```

whereas in the current HEAD, the statement above
is translated to
```
reg my_reg; assign my_reg = 0;
```

This commit fixes this bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant